package util

import "time"

var LocalTime *time.Location

func init() {
	var err error
	LocalTime, err = time.LoadLocation("Asia/Singapore")
	PanicError(err)
}

func NowDay() uint64 {
	var t = time.Now().In(LocalTime)
	return uint64(time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, LocalTime).Unix())
}

func NowMs() uint64 {
	return uint64(time.Now().In(LocalTime).UnixNano()) / 1000000
}
